package com.yuanheng100.ems4j.api.model;

import com.yuanheng100.ems4j.common.constant.Boolean;
import com.yuanheng100.ems4j.api.model.bizstatus.MenuStatus;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by j4love on 2016/12/13.
 * Description : 菜单实体类
 */

@Table(name = "menu")
public class Menu implements Serializable {

    /** 菜单Id,自增主键 */
    @Id
    @GeneratedValue(generator = "JDBC")
    private Integer menuId;

    /** 父菜单Id */
    @Column(name = "parentId")
    private Integer parentId;

    /** 菜单名称 */
    @Column(name = "menuName")
    private String menuName;

    /** 访问路径 */
    @Column(name = "url")
    private String url;

    /** 应用Id */
    @Column(name = "appId")
    private Integer appId;

    /** 菜单顺序，升序排序 */
    @Column(name = "order")
    private Integer order;

    /** 唯一权限标识符 */
    @Column(name = "permission")
    private String permission;

    /** 描述信息 */
    @Column(name = "description")
    private String description;

    /** 菜单状态 */
    @Column(name = "menuStatus")
    private MenuStatus menuStatus;

    /** 是否是菜单 */
    @Column(name = "isMenu")
    private Boolean isMenu;

    public Integer getMenuId() {
        return menuId;
    }


    public void setMenuId(Integer menuId) {
        this.menuId = menuId;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    public Integer getOrder() {
        return order;
    }

    public void setOrder(Integer order) {
        this.order = order;
    }

    public String getPermission() {
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public MenuStatus getMenuStatus() {
        return menuStatus;
    }

    public void setMenuStatus(MenuStatus menuStatus) {
        this.menuStatus = menuStatus;
    }

    public Boolean getIsMenu() {
        return isMenu;
    }

    public void setIsMenu(Boolean isMenu) {
        this.isMenu = isMenu;
    }

    @Override
    public String toString() {
        return "Menu{" +
                "isMenu=" + isMenu +
                ", menuStatus=" + menuStatus +
                ", description='" + description + '\'' +
                ", permission='" + permission + '\'' +
                ", order=" + order +
                ", appId=" + appId +
                ", url='" + url + '\'' +
                ", menuName='" + menuName + '\'' +
                ", parentId=" + parentId +
                ", menuId=" + menuId +
                '}';
    }
}
